define([], function() {
    var f = function() {
        this._events = {};
        // 注册事件
        this.on = function(type, fn) {
            this._events[type] = fn;
        };
        // 触发事件
        this.emit = function(type, params) {
            if (this._events[type]) {
                this._events[type](params);
            };
        }
    }
    return new f();
});